package com.jiazhong.equals;

public class Test {
    public static void main(String[] args) {
        String s1="abc";
        String s2="abc";
        System.out.println(s1==s2);

        String str1=new String("abc");
        String str2=new String("abc");
        System.out.println(str1==str2);
        System.out.println(str1.equals(str2));

        System.out.println(str1.hashCode());
        System.out.println(s1.hashCode());
        System.out.println(("abc").hashCode());
    }
}
